<?php

namespace App\Http\Controllers;

use App\Library\Requests\Base\BasePageRequest;
use App\Library\Requests\Base\IdRequest;
use App\Library\Service\FollowService;
use Illuminate\Http\JsonResponse;

class FollowController extends BaseController
{
    /**
     * @param FollowService $service
     */
    public function __construct(FollowService $service)
    {
        $this->service = $service;
    }

    /**
     * addOrCancel
     * @param IdRequest $request
     * @return JsonResponse
     *
     */
    public function addOrCancel(IdRequest $request): JsonResponse
    {
        return $this->service->addOrCancel($request);
    }

    /**
     * userPaging
     * @param BasePageRequest $request
     * @return JsonResponse
     */
    public function userPaging(BasePageRequest $request): JsonResponse
    {
        return $this->service->userPaging($request);
    }

    /**
     * sellerPaging
     * @param BasePageRequest $request
     * @return JsonResponse
     */
    public function sellerPaging(BasePageRequest $request): JsonResponse
    {
        return $this->service->sellerPaging($request);
    }
}
